package tests;

import java.util.*;

public class test9 {
    public int getMost(int[][] board) {
        // write code here
        for(int i=1;i<6;i++){
            board[i][0]+=board[i-1][0];
            board[0][i]+=board[0][i-1];
        }
        for(int i=1;i<6;i++){
            for(int j=1;j<6;j++){
                board[i][j]=board[i][j]+Math.max(board[i][j-1],board[i-1][j]);
            }
        }
        return board[5][5];
    }
}